package C11_3_PullUpConstruct.refactorbefore;

/**
 * @ClassName : Manager
 * @Description :
 * @Author : wukj1
 * @Date: 2022/8/15
 **/
public class Manager extends Employee {

    private int grade;
    private String name;
    private String id;

    protected Manager(String name, String id, int grade) {
        this.grade = grade;
        this.name = name;
        this.id = id;
        //每个子类的共同体
        if(isPriviliged()) {
            assginCar();
        }
    }

    @Override
    boolean isPriviliged () {
        return grade > 4;
    }

}
